from bs4 import BeautifulSoup

Open_file = open('c://Users//Administrator//Desktop//MySoup.html', 'r', encoding='utf-8')
Html_content=Open_file.read()
Open_file.close()
soup=BeautifulSoup(Html_content,'html5lib')
print('html title is '+soup.title.getText())
find_p=soup.find('p',id='python')
print('the first <p> is '+find_p.getText())
find_all_p=soup.find_all('p')
for i,k in enumerate(find_all_p):
    print('the'+str(i+1)+' p is '+k.getText())